Technical Q&As
QD3D 13 - GWorld in the 'grafPort' Field of a MacDrawContext Struct (1-June-95)
Q I placed a GWorld into the 'grafPort' field of a MacDrawContext struct, and
QuickDraw successfully drew into it. Are there any speed penalties from doing
it this way instead of drawing directly to a window (with or without hardware
acceleration)?
A We recommend against doing this. There is a special kind of draw context,
called a pixmap draw context, which is specifically for rendering to an
offscreen. If there is a hardware accelerator installed, it will not work
properly if you place a GWorld in the 'grafPort' field of a MacDrawContext
struct.
The files you need, and some other useful files, such as the Tumbler
application, are on AppleLink in the Code Exchange folder under the QuickDraw
3D icon. Look for the "3dmf to pict" code snippet.
Note: for 1.0 you have to set the 2D library to be:
kQ3DrawContext2DLibraryUseNone
Technical Q&As
Previous Question | Contents | Next Question